<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">
    <h:head>
        <title>09-HUTECH</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />



    </h:head>
    <h:body>
        <ui:composition template="/common/user/template-user.xhtml">
            <ui:define name="right">
                <p:panel id="matchGrid" style="margin: 0px auto;">
                    <h:panelGrid columns="3"  style="margin: 0px auto;" >  
                        <p:outputLabel value="UserName" />
                        
                        <p:inputText id="username" value="#{cusController.cus.id}"  title="Username" >
                            <p:ajax  event="blur" listener="#{cusController.testIt()}" update="test123"  >
                            </p:ajax>
                        </p:inputText>
                       <p:messages id="test123" globalOnly="true"  /> 
                        <p:outputLabel value="fullName" />
                        <p:inputText value="#{cusController.cus.fullName}">
                                 </p:inputText><span/>
                        <p:outputLabel value="Password"/>
                        <p:password value="#{cusController.cus.password}" match="pwd2" feedback="true"  >
                        </p:password> <span/>
                        <p:outputLabel value="Confirm Password"/>
                        <p:password id="pwd2" value="asd" label="Ps2">
                        </p:password>      <span/>
                        <p:outputLabel value="Address"/>
                        <p:inputText value="#{cusController.cus.address}">
                        </p:inputText>   <span/>
                        <p:outputLabel value="Email"/>
                        <p:inputText value="#{cusController.cus.email}"
                                     requiredMessage="Please enter your email address."
                                     validatorMessage="Invalid email format">
                        </p:inputText>    <span/>
                        <p:outputLabel value="Phone"/>
                        <p:inputMask value="#{cusController.cus.phone}" mask="(99) 999-9999? 9999"/> <span/>
                        <p:outputLabel value="Skype"/>   
                        <p:inputText value="#{cusController.cus.skype}">
                        </p:inputText>
                        <span/>
                        <p:commandButton id="saveButton"  value="Save" action="#{cusController.register()}"  />  
                    <p:commandButton value="Cancel" action="home"/>
                    </h:panelGrid>  
                    

                </p:panel>
            </ui:define>
        </ui:composition>
    </h:body>
</html>